package com.jinhongone.pattern.behavior.responsibility;

/**
 * @author jinho
 * @className Test
 * @description 测试类（java中该模式的运用体现：filterChain）
 * @date 2025/4/14 10:49
 */
public class Test {

    public static void main(String[] args) {
        //请假体
        LeaveRequest leave = new LeaveRequest("小明",8,"晒晒太阳");
        //创建各级领导并设置责任链
        GroupLeaderHandler gl = new GroupLeaderHandler();
        ManagerHandler mh = new ManagerHandler();
        GeneralManagerHandler gm = new GeneralManagerHandler();
        gl.setNextHandler(mh);
        mh.setNextHandler(gm);
        //提交请假审批
        gl.submit(leave);
    }
}
